#ifndef __BSP_CAN_H
#define __BSP_CAN_H

#include "stm32f10x.h"

extern uint8_t flag ;
extern uint32_t left_motor_speed ;
#define CAN_ID   ((uint32_t)0x02)

#define CAN_TX_GPIO_PROT  		GPIOA
#define CAN_TX_GPIO_PIN   		GPIO_Pin_12

#define  CAN_RX_GPIO_PORT     GPIOA
#define  CAN_RX_GPIO_PIN      GPIO_Pin_11

#define CAN_GPIO_CLK					RCC_APB2Periph_GPIOA
																					
void CAN_Config(void) ;  																				
uint8_t  CAN_TransmitData( uint8_t* pmsg, uint8_t len);
void USB_LP_CAN1_RX0_IRQHandler(void);
uint8_t  CAN_TXData( void );
uint8_t CAN_TXSpeed(uint8_t target, uint8_t id);
void  CAN_restart(void);
	
#endif /* __BSP_CAN_H */

